package tp.pr5.console;

import java.util.Scanner;

import tp.pr5.Game;
import tp.pr5.GameController;

public class GameControllerConsole extends GameController {
Console _console=new Console();

	public GameControllerConsole(Game game)
	{
		super(game);
		this._game.addGameObserver(_console);
		this._game.addMapObserver(_console);
		this._game.addPlayerObserver(_console);
	}

	@Override public void runGame()
	{
		this._game.requestStart();
		Scanner sc = new Scanner(System.in);
		while(true) {
			System.out.println("> ");
			String line = sc.nextLine();
			this.executeStep(line);
		}
		
	}
	@Override
	public String executeStep(String line) {
		super.executeStep(line);
		return line;
	}
	

}
